import Vue from "vue";
import Router from "vue-router";
Vue.use(Router);

import Example from "./example";

const router = new Router({
  mode: "history",
  routes: [
    { path: "/login", component: () => import("@/page/index") },
    ...Example,
  ],
});

const VueRouterPush = Router.prototype.push;
Router.prototype.push = function push(to) {
  return VueRouterPush.call(this, to).catch((err) => err);
};

export default router;
